<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-11-04 11:24:58
         compiled from "H:\WebApplication\myconpany\sumi_mobile\application\views\user\supply.html" */ ?>
<?php /*%%SmartyHeaderCode:2193561c992e9441c7-57870628%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '294df7c4857bf9332f801d35ee5862f55e79d779' => 
    array (
      0 => 'H:\\WebApplication\\myconpany\\sumi_mobile\\application\\views\\user\\supply.html',
      1 => 1446607449,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2193561c992e9441c7-57870628',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.21-dev',
  'unifunc' => 'content_561c992eb51383_98805274',
  'variables' => 
  array (
    'info' => 0,
    'item' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_561c992eb51383_98805274')) {function content_561c992eb51383_98805274($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/header.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<!--header stop-->
<?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/common/headerusertitle.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<!--header end-->
<!--content stop-->
<section class="box-user">
    <div class="issue_price">
        <p class="lh24p fs14p">请在下方填写您的<span class="orange">真实报价内容</span>（价格必填）</p>
        <p class="lh24p gray fs14p">例如:HDPE 7000F 伊朗石化25吨 9860元 现货 美金 L/C 60天 宁波</p>
        <select name="business_id" id="business_id" class="input_test business_id">
            <?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['item']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['info']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
?>
            <option value="<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
" <?php if ($_smarty_tpl->tpl_vars['item']->value['is_default']=='Y') {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['item']->value['business_name'];?>
</option>
            <?php } ?>
        </select>
        <textarea class="isp_text" name="content"  placeholder="请输入您内容"></textarea>
        <a href="#" class="isp_btn">提交发布</a>
    </div>
</section>
<!--content end-->



<?php echo '<script'; ?>
>
    $(function(){
        $(".isp_btn").click(function(){

            var business_id =  $(".business_id :selected").val();
            var remark =  $(".isp_text").val();

            $.ajax({
                url:'/user/supply',
                data:{business_id:business_id,remark:remark},
                type:'POST',
                success:function(data){
                    var data = eval("("+data+")");
                    var code = data.code;
                    var msg = data.msg;
                    if(code == 8){
                        window.location.href = "/user/supplylist";
                    }else{
                        alert(data.msg);
                    }
                    return false;
                },
                dataType:'text'
            });
        });
    });
<?php echo '</script'; ?>
>

<?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/footer.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php }} ?>
